<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Biblioteca Metadado</title>
	<link rel="stylesheet" href="css/styles.css" type="text/css" />
	
	<script type="text/javascript" src="javascript/jquery-1.4.2.min.js"></script>
	<script type="text/javascript">
		JQ = $; //to use jquery and prototype together
	</script>
	<script type="text/javascript" src="scriptaculous/prototype.js"></script>
	<script type="text/javascript" src="scriptaculous/scriptaculous.js"></script>
	<script type="text/javascript" src="javascript/jquery.hoverIntent.minified.js"></script> 
	<script type="text/javascript" src="javascript/superfish.js"></script> 
	<script type="text/javascript" src="javascript/javascript.js"></script>
	
</head>

<body>
	<div id="wrap">
		<div id="header">
			<div id="logo">
				<h1><a href="index.html">Metadado</a></h1>
			</div>
			<div id="nav">
				<ul>
					<li title="Administração">
						<a>Administração</a>
						<ul class="submenu" style="display:none;position:absolute;margin-top:40px;">
							<li title="Livros" class="selected"><a href="admLivro.html">Livros</a></li>
							<li title="Editoras"><a href="admEditora.html">Editoras</a></li>
							<li title="Autores"><a href="admAutor.html">Autores</a></li>
						</ul>
					</li>
					<li title="Reservas"><a href="reserva.html">Reservas</a></li>
					<li title="Perfil"><a href="perfil.html">Perfil</a></li>
					<li title="Logout"><a href="index.html">Logout</a></li>
				</ul>
			</div>
			<div class="clear"></div>
		</div>
		<div id="page">	
			<div id="main-content">
				<h2>Administração de livros</h2>
				<table width="100%" cellspacing="0" style="border:solid 5px #FFFFFF;">
					<tr style="background-color:#E0CFB8;">
						<td width="100%" style="padding:5px;">
							<a onclick="showDiv('adicionar')">+ livro</a>
						</td>
					</tr>
					<tr>
						<td>
							<div id="adicionar" style="display:none;border:2px solid #E0CFB8">
								<table width="100%" cellspacing="10">
									<tr>
										<td>Nome: </td>
										<td width="100%"><input style="width:300px" /></td>
									</tr>
									<tr>
										<td>Imagem: </td>
										<td>
											<input type="file" style="width:300px" />
										</td>
									</tr>
									<tr>
										<td>Autor(es): </td>
										<td>
											<div>
												<select style="width:300px">
													<option></option>
													<option>Autor 1</option>
													<option>Autor 2</option>
													<option>Autor 3</option>
													<option>Autor 4</option>
													<option>Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
											</div>
											<a class="adicionarAutor">+ autor</a>
										</td>	
									</tr>
									<tr>
										<td>Editora: </td>
										<td>
											<select style="width:300px">
												<option></option>
												<option>Editora 1</option>
												<option>Editora 2</option>
												<option>Editora 3</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>Cópias: </td>
										<td><input style="width:30px" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<div class="submit">
												<input onclick="showDiv('adicionar')" type="submit" class="button" value="SALVAR" />
											</div>
										</td>	
									</tr>
								</table>
							</div>
						</td>
					</tr>
					<tr style="background-color:#F0DFC8;">
						<td style="padding:5px;">
							<a onclick="showDiv('linha1')">Livro 1</a>
							<a class="excluir" style="margin-left:5px;">X</a>
						</td>
					</tr>
					<tr>
						<td>
							<div id="linha1" style="display:none;border:2px solid #F0DFC8">
								<table width="100%" cellspacing="10">
									<tr>
										<td>Nome: </td>
										<td width="100%"><input value="Livro 1" style="width:300px" /></td>
									</tr>
									<tr>
										<td>Imagem: </td>
										<td>
											<input value="livro1.gif" style="width:300px" />
											<a class="editarImagem" style="margin-left:5px;">X</a>
											<input type="file" style="width:300px;display:none" class="inputFile"/>
										</td>
									</tr>
									<tr>
										<td>Autor(es): </td>
										<td>
											<div>
												<select style="width:300px">
													<option></option>
													<option selected="selected">Autor 1</option>
													<option>Autor 2</option>
													<option>Autor 3</option>
													<option>Autor 4</option>
													<option>Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
												<select style="width:300px">
													<option></option>
													<option>Autor 1</option>
													<option>Autor 2</option>
													<option>Autor 3</option>
													<option selected="selected">Autor 4</option>
													<option>Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
											</div>
											<a class="adicionarAutor">+ autor</a>
										</td>
									</tr>
									<tr>
										<td>Editora: </td>
										<td>
											<select style="width:300px">
												<option></option>
												<option>Editora 1</option>
												<option>Editora 2</option>
												<option selected="selected">Editora 3</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>Cópias: </td>
										<td><input value="4" style="width:30px" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<div class="submit">
												<input onclick="showDiv('linha1')" type="submit" class="button" value="SALVAR" />
											</div>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
					<tr style="background-color:#E0CFB8;">
						<td style="padding:5px;">
							<a onclick="showDiv('linha2')">Livro 2</a>
							<a class="excluir" style="margin-left:5px;">X</a>
						</td>
					</tr>
					<tr>
						<td>
							<div id="linha2" style="display:none;border:2px solid #E0CFB8">
								<table width="100%" cellspacing="10">
									<tr>
										<td>Nome: </td>
										<td width="100%"><input value="Livro 2" style="width:300px" /></td>
									</tr>
									<tr>
										<td>Imagem: </td>
										<td>
											<input value="livro2.gif" style="width:300px" />
											<a class="editarImagem" style="margin-left:5px;">X</a>
											<input type="file" style="width:300px;display:none" class="inputFile"/>
										</td>
									</tr>
									<tr>
										<td>Autor(es): </td>
										<td>
											<div>
												<select style="width:300px">
													<option></option>
													<option>Autor 1</option>
													<option>Autor 2</option>
													<option>Autor 3</option>
													<option>Autor 4</option>
													<option selected="selected">Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
											</div>
											<a class="adicionarAutor">+ autor</a>
										</td>
									</tr>
									<tr>
										<td>Editora: </td>
										<td>
											<select style="width:300px">
												<option></option>
												<option>Editora 1</option>
												<option>Editora 2</option>
												<option selected="selected">Editora 3</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>Cópias: </td>
										<td><input value="1" style="width:30px" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<div class="submit">
												<input onclick="showDiv('linha2')" type="submit" class="button" value="SALVAR" />
											</div>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
					<tr style="background-color:#F0DFC8;">
						<td style="padding:5px;">
							<a onclick="showDiv('linha3')">Livro 3</a>
							<a class="excluir" style="margin-left:5px;">X</a>
						</td>
					</tr>
					<tr>
						<td>
							<div id="linha3" style="display:none;border:2px solid #F0DFC8">
								<table width="100%" cellspacing="10">
									<tr>
										<td>Nome: </td>
										<td width="100%"><input value="Livro 3" style="width:300px" /></td>
									</tr>
									<tr>
										<td>Imagem: </td>
										<td>
											<input value="livro3.gif" style="width:300px" />
											<a class="editarImagem" style="margin-left:5px;">X</a>
											<input type="file" style="width:300px;display:none" class="inputFile"/>
										</td>
									</tr>
									<tr>
										<td>Autor(es): </td>
										<td>
											<div>
												<select style="width:300px">
													<option></option>
													<option>Autor 1</option>
													<option>Autor 2</option>
													<option>Autor 3</option>
													<option>Autor 4</option>
													<option selected="selected">Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
											</div>
											<a class="adicionarAutor">+ autor</a>
										</td>
									</tr>
									<tr>
										<td>Editora: </td>
										<td>
											<select style="width:300px">
												<option></option>
												<option>Editora 1</option>
												<option>Editora 2</option>
												<option selected="selected">Editora 3</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>Cópias: </td>
										<td><input value="3" style="width:30px" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<div class="submit">
												<input onclick="showDiv('linha3')" type="submit" class="button" value="SALVAR" />
											</div>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
					<tr style="background-color:#E0CFB8;">
						<td style="padding:5px;">
							<a onclick="showDiv('linha4')">Livro 4</a>
							<a class="excluir" style="margin-left:5px;">X</a>
						</td>
					</tr>
					<tr>
						<td>
							<div id="linha4" style="display:none;border:2px solid #E0CFB8">
								<table width="100%" cellspacing="10">
									<tr>
										<td>Nome: </td>
										<td width="100%"><input value="Livro 4" style="width:300px" /></td>
									</tr>
									<tr>
										<td>Imagem: </td>
										<td>
											<input value="livro4.gif" style="width:300px" />
											<a class="editarImagem" style="margin-left:5px;">X</a>
											<input type="file" style="width:300px;display:none" class="inputFile"/>
										</td>
									</tr>
									<tr>
										<td>Autor(es): </td>
										<td>
											<div>
												<select style="width:300px">
													<option></option>
													<option>Autor 1</option>
													<option selected="selected">Autor 2</option>
													<option>Autor 3</option>
													<option>Autor 4</option>
													<option>Autor 5</option>
												</select>
												<a class="excluirAutor" style="margin-left:5px;">X</a>
												<br />
											</div>
											<a class="adicionarAutor">+ autor</a>
										</td>
									</tr>
									<tr>
										<td>Editora: </td>
										<td>
											<select style="width:300px">
												<option></option>
												<option>Editora 1</option>
												<option selected="selected">Editora 2</option>
												<option>Editora 3</option>
											</select>
										</td>
									</tr>
									<tr>
										<td>Cópias: </td>
										<td><input value="11" style="width:30px" /></td>
									</tr>
									<tr>
										<td></td>
										<td>
											<div class="submit">
												<input onclick="showDiv('linha4')" type="submit" class="button" value="SALVAR" />
											</div>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>
					<tr>
						<td align="center" style="padding-top:10px;">
							<a>&lt;&lt;</a> <a>1</a>..<a>5</a> <strong>6</strong> <a>7</a>..<a>20</a> <a>&gt;&gt;</a> 
						</td>
					</tr>
				</table>
			</div>
			<div id="main-sidebar">
				<div class="sidebar-box brown-box">
					<p>Aqui entraria uma breve descrição sobre a funcionalidade desta página. Além disso, aqui também ficariam algumas instruções sobre como utilizar a mesma.</p>
				</div>
				<div class="sidebar-box">
					<h4>Links Úteis</h4>
					<ul>
						<li><a href="http://www.google.com" title="Google">Google</a></li>
						<li><a href="http://www.ufrj.br" title="UFRJ">UFRJ</a></li>
						<li><a href="http://www.amazon.com" title="Amazon">Amazon</a></li>
					</ul>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		
		<div class="footer">
			<div class="footer-level-2">
				<p>
					<a href="admLivro.html">Administração</a>
					<a href="reserva.html">Reservas</a>
					<a href="perfil.html">Perfil</a>
				</p>
			</div>
		</div>
		<div class="page-end">
			<p>&copy; 2010 www.bibliotecametadado.edu.br. Webmasters: <a href="mailto:difel110185@gmail.com" title="Diego Felix">Diego Felix</a> e <a href="mailto:pedro.henrique.108@gmail.com" title="Pedro Jesus">Pedro Jesus</a></p>
		</div>
	</div>
	<script>
		JQ(document).ready(function() {
			JQ('.adicionarAutor').bind('click', function() {
				JQ(this).prev().append('<select style="width:300px"><option></option><option>Autor 1</option><option>Autor 2</option><option>Autor 3</option><option>Autor 4</option><option>Autor 5</option></select><a class="excluirAutor" style="margin-left:5px;">X</a><br />');
			});

			JQ('.excluirAutor').bind('click', function() {
				JQ(this).prev().remove();
				JQ(this).next().remove();
				JQ(this).remove();
			});

			JQ('.excluir').bind('click', function() {
				if(confirm('Deseja realmente excluir este livro?'))
					location.reload(true);
			});

			JQ('.editarImagem').bind('click', function() {
				JQ(this).prev().remove();
				JQ(this).next().show();
				JQ(this).remove();
			});

			JQ(document).ready(function(){ 
		        JQ("#nav ul").superfish(); 
		    }); 
		});
	</script>
</body>
</html>
